<!--做题页面-单词 type=6 填空-->
<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/evaluation/question.css">
<script src="/cn/js/jquery-1.12.2.min.js"></script>
<div class="head">
    <input id="startTime" value="" type="hidden">
    <input id="maxtime" value="<?php echo $totalTime ?>" type="hidden">
    <input type="hidden" value="<?php echo isset($_GET['subjectId']) ? $_GET['subjectId'] : 1 ?>" id="subjectId">
    <input type="hidden" value="<?php echo isset($_GET['pubId']) ? $_GET['pubId'] : 1 ?>" id="pubId">
    <input type="hidden" value="<?php echo $nextSubject != false ? $nextSubject : 0 ?>" id="nextSubjectId">
    <input type="hidden" value="<?php echo $cateData['type'] ?>" id="type">
    <div class="container">
        <p class="headTitle">申友雅思-<?php echo $cateData['pidName'] ?>测评-<?php echo $cateData['name'] ?></p>
        <p class="timeStr"><img
                    src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/cuttime.png"><span></span>
        </p>
        <p class="quiteBtn" onclick="quite()"><img
                    src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/quite.png">Quit</p>
    </div>
</div>
<div class="container main">
    <?php if ($list[0]['parent']['name']) { ?>
        <div class="section directions_box">
            <p class="section_title">Directions:</p>
            <div class="directions_text">
                <?php

                echo $list[0]['parent']['name'];

                ?>
            </div>

        </div>
    <?php } ?>
    <div class="section question_box">

        <p class="section_title">Questions:</p>
        <div class="question_article" style="display:block;overflow-y: auto;margin-bottom: 10px">
            <?php
            static $str = '';
            foreach ($list[0]['son'] as $k => $v) {
                if ($k == 0) $str = $list[0]['parent']['question'];
                $substr = '<input class="gap_filling" oninput="vocabulary(this,' . $v['id'] . ',&apos;' . $v['answer'] . '&apos;)">';
                $str = preg_replace('/&amp;#/', $substr, $str, 1);
            }
            echo $str;
            ?>
        </div>
        <p class="next_btn">
            <button class="" onclick="saveAnswer()">Next ></button>
        </p>
    </div>

</div>
<div class="next_modal question_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Response Required
            <img onclick="closeModal(this)"
                 src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>要先选择答案才能继续下一题哦</p>
        </div>
        <div class="modal-footer">
            <button class="nextBtn" onclick="closeModal(this)">OK</button>
        </div>
    </div>
</div>
<div class="next_modal  Quite_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Quit
            <img onclick="closeModal(this)"
                 src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>是否确定退出，退出将不保留测评记录</p>
        </div>
        <div class="modal-footer">
            <button class="noBtn" onclick="closeModal(this)">No</button>
            <button class="yesBtn" onclick="pageBack()">Yes</button>
        </div>
    </div>
</div>
<script src="/cn/js/evaluation/public.js"></script>

<script>
    var dirHei = $('.directions_box').height();
    var titleHei = $('.question_title').height();
    console.log('dirHei', dirHei)
    var quesHei = "calc(100% - " + dirHei + "px - 50px)";
    var tableHei = "calc(100% -  110px )";
    $('.question_box').css({'height': quesHei});
    $('.question_article').css({'height': tableHei})

    var startTime = Math.ceil(new Date().getTime() / 1000); //单位秒
    $('#startTime').val(startTime);
    cutTime();
</script>
